<%-- 
    Document   : helloView
    Created on : Dec 10, 2011, 4:38:12 PM
    Author     : Yuuzaa
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Contract</title>
    </head>
    <body>
        <h1>Contract</h1>
        <form action="" method="post">
            Supplier ID: <input type="text" name="supplierId" value="">
            </br>
            Client ID: <input type="text" name="clientId" value="">
            </br>
            Start date (DD.MM.YYYY): <input type="text" name="startDate" value="">
            </br>
            End date (DD.MM.YYYY): <input type="text" name="endDate" value="">
            </br>
            Area ID: <input type="text" name="areaId" value="">
            </br>
            Facility ID: <input type="text" name="facilityId" value="">
            </br>
            Settlement method: <input type="text" name="settlementMethod" value="">
            </br>
            Is confirmation message? <input type="checkbox" name="isConfirmation"/>
            </br>
            <table>
                <tr>
                    <td>
                    </td>
                    <td>
                        message Id    
                    </td>
                    <td>
                        start date  
                    </td>
                    <td>
                        end date    
                    </td>
                    <td>
                        Provider party    
                    </td>
                    <td>
                        client party    
                    </td>
                </tr>

                <c:forEach items="${messageList}" var="mes">
                    <tr>
                        <td>    
                            <input type="radio" name="messageId" value=${mes.messageId} checked> 
                        </td>
                        <td>
                            ${mes.messageId}
                        </td>
                        <td>
                            ${mes.contractInfo.startDate}
                        </td>
                        <td>
                            ${mes.contractInfo.endDate}
                        </td>
                        <td>
                            ${mes.providerParty.name}
                        </td>
                        <td>
                            ${mes.clientParty.name}
                        </td>
                    </tr>
                </c:forEach>

            </table>
            <input type="submit" name="actionId" value="Get messages">
            <input type="submit" name="actionId" value="Send message to supplier"/>
        </form>
    </body>
</html>
